Quiz 16
Question # 1
Q
Consider the following table:
CREATE TABLE Name (
LastName VARCHAR(5)
);
What will happen when the following statements are executed?
INSERT INTO Name VALUES('Smith');
INSERT IGNORE INTO Name VALUES('Edward');
A)
Both names are inserted successfully.
B)
Error: Data too long for column LastName.
Question # 2
Q
Choose the query/ queries that will return the same date and time values.
A)
SELECT SYSDATE(), NOW();
B)
SELECT NOW(), SLEEP(10), NOW();
C)
SELECT SYSDATE(), SLEEP(10), SYSDATE();
Question # 3
Q
Consider the following function:
DELIMITER **
CREATE FUNCTION function1()
RETURNS DATE
BEGIN
RETURN CURDATE()- interval 1 day;
END**
DELIMITER ;
What will be the output of the following statement?
SELECT function1();
A)
It displays the current date.
B)
It displays tomorrow’s date.
C)
It displays yesterday’s date.
D)
It results in syntax error.
Quiz 15
Practice Set 1
Mark as Completed
Report an Issue